package regex.a02demo2;

public class Test2 {
    public static void main(String[] args) {
        String s = "我要学学编编编编程程程";
        String s1 = s.replaceAll("(.)\\1+", "$1");
        System.out.println(s1);
    }
}
